package sculove.spring.framework.util;

import java.text.SimpleDateFormat;
import java.util.Calendar;

/**
 * 날자 처리 Util
 * @author sculove
 * 
 */
public class DateUtil {
	private static String getCurrentTime(String format) {
		SimpleDateFormat sdf = new SimpleDateFormat(format);
		String timeInMillis = sdf.format(Calendar.getInstance().getTime());
		return timeInMillis;
	}

	public static String getYyyyMmDd() {
		return getCurrentTime("yyyyMMdd");
	}

	public static String getYear() {
		return getCurrentTime("yyyy");
	}

	public static String getMonth() {
		return getCurrentTime("MM");
	}

	public static String getDay() {
		return getCurrentTime("dd");
	}
}
